import request from '@/utils/request'

//添加优惠卷
export function couponupdate(data) {
  return request({
    url: '/manager/coupon',
    method: 'post',
    data,
  })
}

//查看优惠卷
export function getcoupon(offset, pagesize, type) {
  return request({
    url: '/manager/couponlist',
    method: 'get',
    params: {
      offset: offset,
      pagesize: pagesize,
      type: type,
    },
  })
}

//查看优惠卷
export function deletecoupon(id) {
  return request({
    url: '/manager/coupondelete',
    method: 'delete',
    params: {
      id: id,
    },
  })
}
